package com.yegs.jltqc.U8ServiceImpl;

import com.yegs.jltqc.U8Service.CommonService;
import com.yegs.jltqc.U8Service.QmilcodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class CommonServiceImpl implements CommonService {

    @Autowired
    @Qualifier("u8JdbcTemplate")
    private JdbcTemplate u8JdbcTemplate;

    @Override
    public List<Map<String, Object>> findAll(String tableName) {
        String sql = "select * from " + tableName;
        return u8JdbcTemplate.queryForList(sql);
    }
}
